home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.03 Mar 90 / Debug CDEF Code / dummy_cdef.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-01-27  |  837 b   |  35 lines  |  [TEXT/KAHL]

  1. /******** System includes ********/
  2. #include <ResourceMgr.h>
  3. #include <ControlMgr.h>
  4. #include <MemoryMgr.h>
  5. /**********************************/
  6.  
  7. /******** typedefs ********/
  8. typedef struct {
  9.     char *cdef_ptr ;
  10. } CJMP, *CJMP_PTR, **CJMP_HDL ;
  11. /**********************************/
  12.  
  13. /******** Subroutine prototypes ********/
  14. pascal long main( int, ControlHandle, int, long ) ;
  15. /**********************************/
  16.  
  17. pascal long main( varCode, theControl, message, param )
  18. int varCode ;
  19. ControlHandle theControl ;
  20. int message ;
  21. long param ;
  22. {
  23.     long result ;
  24.     CJMP_HDL cjmp_hdl ;
  25.     
  26.     /* First get the CJMP resource */
  27.     cjmp_hdl = (CJMP_HDL)GetResource( 'CJMP', 9999 ) ;
  28.     if( cjmp_hdl != 0L ) {
  29.         /* Now call the real cdef routine */
  30.         result = CallPascalL( varCode, theControl, message, param, (**cjmp_hdl).cdef_ptr ) ;
  31.     }
  32.     
  33.     return result ;
  34. }
  35.